fixing stacktrace exception