fixed a bug in teh layering system