Fixed another bug with the last implementation.