fixing bugs in develop -- works with 1.4 now