Fixed errors from matts merge