more fixes .... we really need to start refactoring