Bug fixes

Fixed shift bug.
First step to datafiltering