fixing ajax polling and images