bugs fixes in app and server