bug fix and minor ui refinement