Fixed bug in formating