Fix if condition to not overwrite already set frameNextMethod.