fixed zooming bug, fixed null pointer bug