Ahead of time compilation related fixes