Hopefully working version.