First debug and found some bugs.