fixed bugs and crashes introduced by coop code