fixed bug preventing lose condition from being triggered