#BUG: Many bugs fixed