fixed misc. bugs while running on device