Didn't take into account for zindex updating. Reduced some code for text shadow updating