fixed bug in culling