Fixed some bugs present on Mavericks.