fixed all the errors caused by the horrible merge!