Fixed bug. /See comment below/