fix crash on non-string error in step and other functions