Fixing null pointer on ramp bug