Fixed gl issues