fixed bugs maintenance
fixed minor javascript error