Fixes error showing function