fixing infinite loop on native methods invocation

fixing infinite loop on native methods invocation