Addressed bugs 2146 and 2147.