Add an error check and a transform adjustment