Bug with None values fixed