Fix stack trace bug on safari