collection: pop method bug fix, tests for it added