Revert 06abb18..017a0cc

This rolls back to commit 06abb1814763be46a51f1ce7c09e5edb00e470bd.
Bug fixes