added error callback

Adds in error callbacks where there were none