Fixed #2320 and #2354.
Backend SHA: 0aad628efcd6f51956e838f6e99d6aa469bcb41d