final fixes and debugging