minor bugfixes in use of ptrs and struct-definitions