Bug fixes before submission