some edits, additional null checks in PJOGL