Fixed JS warnings