Various bugs fixed, server works