fix a few halgfx bugs and scene loader bugs