Fixed issue #9

Fixed the bug where client only code accidentaly got run on both client
and server.