trying to fix javascript issues