Test: decreased waiting time
Fixed callback calls

they weren't handling the environment correclty