WIP: fixing issue with error messages (replacing push by shift)