Miscellanous compile fixes