Changed matching condition in stacking functionality in Station class