Fixed small bug with depth