Fixed logic error.
Error checking on camera dimensions.