extra check for not getting out of scope in case of parameter manipulation