Fixes #6068 & #4605