fixed bad camera cast. added workaround for camera creation.