Recommit with working version

Bug fix.