trying to fix javascript issue