Fixed some GL issues