Created by: lionello
Fixes Cannot read property 'x' of undefined errors
Cannot read property 'x' of undefined