use jQuery ajax call without timeout
fix javascript bugs