fix #270 by using proper zordering algorithm for drawing AND hittesting