Ashkan: Some bugs fixed.