Fixed a bug in the shader manager