bugfix regarding null pointer exception