Fixed z-index issue where dynamically created entities would always appear in front of everything else