fixed warnings in js code