Further tweaking, minor bug fix