Added record from queue. Bug fixes