Fixed consequences and formated code