Layer modifications fixed completely
Last commit wasn't really a fix, so I reverted it and fixed it properly