fixed compile-time bugs