fix undefined method respond_to?