Fixing a small bug with css layer z-index position