Added some checks to the stacking event