Fixes crash when referencing error variable from same line of code