changed exit code of timeout
fixed bug in phase 3