Added back stuff deleted in commit 9ecec