fixed issues with building on client and server