fixed bug with error from Caleb