Fix for error bug