fix type miss
fix function for vram handling.
fix almost warning at compile time