fixed bugs and updated server and client