Fixed a bunch of layer errors