Fixed some logical errors in the abstract element class

The movement will now work much better