fixed poor js