misc (potential) bug fixes