Fixing some compile-time bugs