little js help for error