Fixed null pointer exception.. maybe