FIX: Miscellaneous bugs (Giuseppe)