server and scratch compile fix