fixed npe and getting a broken blueprint with the middle mouse button