Fixed related issues to #5601