Fixing buildCommand and tests