fix bug getLCS, clean some obsolete code