several fixes for server deploy