Final touches, bug fixed