fixing js alert

executes after page now