Remove unnecessary frames in stack trace