fix prototype mismatch
various updates