Some silly bugs fixed.