Fixed a bug involving const