Compiled but not running correctly