Fixed whitescreen bug