Change made to javascript so it doesn't require reload