Adding game end signal and fix array length