Bug fixes, updated for manual packaging