UPDATED: Fixed unit tests