fixed layering bugs