fixed rem-xx-from-d and eigen related errors