Fixed some issues related to Jonathan's comments