null pointor bug fix