Increased number of pending tasks. Added some defines in gateway.