some small fixes to get it to work on the lgm server