Fixed problems introduced in last commit