more flex, fixes and stuff