Javascrypt Sync Problems