Attempt to get JS variable working properly