Fixed formatting and validation