Fixed minor bug in above