Fixed command calling and turn ending.