Some small bugs fixed.