Merged fixes from GoLismero.