apply latest improvements from refluxjs