Some changes according to the comment of @gicmo