Fixed critical bug: checking parameters after trigger GIL and exiting without release