Improved status code and error logging. Fixes bug in model-bound uniforms.