fixed first part of https://github.com/zrho/afp/issues/145 in a cheap way