attempting to resolve some error handling issues