properly fixed last error