Some test cases for ASMD. and fixed bugs