Fixed #2339 and #2355.
Backend SHA: 0aad628efcd6f51956e838f6e99d6aa469bcb41d