Fixed some minor faults, to make it compile