Removed use of MappableStackWrapper and used for-loop checking instead.