removed unused macros
added other possible cases
now sharp module works