Fix image display bug.

Also free the vertex array object correctly.