Trying to fix javascript, part 2