nulpointer bugfix