Fixes a bug in last revision