parse raw only once while it is read + fix compiler warnings