Fixed errors in tests and implementation

Docker-DCO-1.1-Signed-off-by: Sasha Gerrand <github.com@sgerrand.com> (github: sgerrand)