Improve warnings. Also some resize problems. Fixes #91