Cleaned up again and bug fixed where no exception was thrown.