fix to run js after images load