fixed METHOD_NOT_ALLOWED when Id empty and not nil