Fixes stack shortening errors