fixed beforore_script commands