fixed strange null pointer exception