null pointer error fixes, feel free to add a choice! :D