Fix for https://github.com/capistrano/capistrano/issues/677