diff --git a/utils.go b/utils.go
index 27478002d33da774cc2ba30aff3b664a8c89722a..5a9d02c490b56018b03e9eeb5fffb01828e65eb5 100644
--- a/utils.go
+++ b/utils.go
@@ -49,10 +49,10 @@ func CompareConfig(a, b *Config) bool {
 }
 
 func MergeConfig(userConf, imageConf *Config) {
-	if userConf.Hostname != "" {
+	if userConf.Hostname == "" {
 		userConf.Hostname = imageConf.Hostname
 	}
-	if userConf.User != "" {
+	if userConf.User == "" {
 		userConf.User = imageConf.User
 	}
 	if userConf.Memory == 0 {