fix undefined method on scripts