Fixed error callback