fixes wait_for_service and bonds storage

Few fixes for bugs I ran into, when testing the reference counting implementation (refs #19)