Fixed multiple compile errores