Crash and compile fix