Formatting reviewed, fatal bug fixed

exception was thrown due to formatting error