bugfix: null pointer bug