adding a counter to avoid 304 status